package net.seabookchen.pojo.wrapper;

public class BlogPopularity implements Comparable<BlogPopularity> {
	private Long blogId;
	private int commentsSize;
	private String title;

	public BlogPopularity() {}
	
	public BlogPopularity(Long blogId, int commentsSize, String title) {
		this.blogId = blogId;
		this.commentsSize = commentsSize;
		this.title = title;
	}

	public Long getBlogId() {
		return blogId;
	}

	public void setBlogId(Long blogId) {
		this.blogId = blogId;
	}

	public int getCommentsSize() {
		return commentsSize;
	}

	public void setCommentsSize(int commentsSize) {
		this.commentsSize = commentsSize;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Override
	public int compareTo(BlogPopularity o) {
		return o.commentsSize - this.commentsSize;
	}
}
